package com.axter.libs.photo;

import android.widget.ImageView;

import com.axter.libs.photo.display.IPhotoDisplayInterface;
import com.axter.libs.photo.display.LoadingListener;
import com.axter.libs.photo.display.LoadingProgressListener;

/**
 * Created by zhaobo on 2016/11/25.
 */

public class ImageLoaderCache {
    private static IPhotoDisplayInterface displayInterface;

    public static IPhotoDisplayInterface getDisplayInterface() {
        return displayInterface;
    }

    public static void setDisplayInterface(IPhotoDisplayInterface displayInterface) {
        ImageLoaderCache.displayInterface = displayInterface;
    }

    public static void displayUrl(String url, ImageView imageview, LoadingListener listener, LoadingProgressListener progressListener) {
        displayInterface.displayUrl(url, imageview, listener, progressListener);
    }

    public static void displayLocale(String path, ImageView imageView, int width, int height, int resid) {
        displayInterface.displayLocale(path, imageView, width, height, resid);
    }

    public static String getLocalPath(String imageUri) {
        return displayInterface.getLocalPath(imageUri);
    }
}
